package com.lhz.model.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author LiGezZ
 * @Date 2021/08/02 20:57:07
 * @Description: 定时任务调度
 */
@Schema(description = "定时任务调度响应参数")
@Data
public class JobInfoVo implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 下列参数作为参考，可根据实际情况进行增加或者减少
     */
    @Schema(description = "任务ID")
    private Long id;

    @Schema(description = "任务名称")
    private String name;

    @Schema(description = "cron执行表达式")
    private String cron;

    @Schema(description = "后续执行时间")
    private List<String> nextExecution;

    @Schema(description = "执行版本(每执行一次加一)")
    private Integer version;

    @Schema(description = "任务执行器地址")
    private String executorAddress;

    @Schema(description = "任务执行器Bean对象.方法名称")
    private String executorHandler;

    @Schema(description = "任务执行参数,以key=value形式，多个用逗号分割")
    private String executorParam;

    @Schema(description = "状态（1-执行中,2-暂停）")
    private Integer triggerStatus;

    @Schema(description = "状态（1正常 1暂停）")
    private Integer status;

    @Schema(description = "备注信息")
    private String remark;

    @Schema(description = "创建者")
    private Long createBy;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新者")
    private Long updateBy;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    /**
     * vo类进行creteUser、updateUser进行额外的封装
     */
    @Schema(description = "创建人")
    private String createUser;

    @Schema(description = "更新人")
    private String updateUser;
}
